package stu.day9_day18;

import java.util.PriorityQueue;

public class LeetCode933 {

    PriorityQueue<Integer> queue = new PriorityQueue<>();

    public int ping(int t) {

        int num = t-3000;
        queue.offer(t);
        while (!queue.isEmpty() && queue.peek()<num){
            queue.poll();
        }

        return queue.size();

    }
}
